Skip to content

perf: dynamically import heavy components and lazy load stellar sdk o… - #35

Merged
elizabetheonoja-art merged 1 commit into
Utility-Protocol:mainfrom
Jess52487:feature/bundle-splitting
Jun 20, 2026
Merged

perf: dynamically import heavy components and lazy load stellar sdk o…#35
elizabetheonoja-art merged 1 commit into
Utility-Protocol:mainfrom
Jess52487:feature/bundle-splitting

Conversation

@Jess52487

Copy link
Copy Markdown
Contributor

closes #16

Description
This pull request optimizes the initial loading performance of the application on slow networks by decoupling heavy libraries and rendering components from the critical load path.

Key Changes
Dynamic Component Loading: Converted GridMap, LiveDataView, TariffEditor, and TxModal imports inside src/app/page.tsx to next/dynamic.
Visual Skeletons: Added custom Loading Skeletons for each dynamic component matching their actual width, height, and border styles.
Type-Only SDK Import: Modified static imports of @stellar/stellar-sdk inside WalletProvider.tsx and useWeb3Auth.ts to import type definitions.
Lazy Load SDK: Placed dynamic imports of @stellar/stellar-sdk inside the connect() and restoration useEffect() hooks. This keeps the heavy SDK bundle off the initial layout critical path.
Suspense Transitions: Wrapped dynamic components inside wrappers.

@elizabetheonoja-art elizabetheonoja-art left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elizabetheonoja-art
elizabetheonoja-art merged commit 8cd5b3e into Utility-Protocol:main Jun 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue 17: Strict Dynamic Component Code Splitting Tailored for Slow Field Networks

2 participants